<nav class="navbar navbar-expand navbar-light bg-light">
    <div class="container">
        <a href="/" class="navbar-brand">
            <img style="height: 50px;" class="logo" src="/images/logo.png" alt="" />淘兴趣
        </a>
        <form action="" method="get" class="form-inline">
            <input type="search" class="form-control search" style="margin-top: 15px;" />

        </form>
        <ul class="navbar-nav ml-auto">

            <li class="nav-item dropdown">
                <% if(typeof userData !== `undefined`){ %>
                <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><%= userData.account %></button>
                <div class="dropdown-menu dropdown-menu-right">
                    <a class="dropdown-item" href="/user_content">个人中心</a>
                    <a class="dropdown-item" href="/my_topicList">我的趣点</a>
                    <a class="dropdown-item" href="/login?msg=logout">退出</a>
                </div>
                <% }else{ %>
            <li><a style="white-space:nowrap;" class="nav-link" href="/login">登录</a></li>
            <li><a style="white-space:nowrap;" class="nav-link" href="/register">注册</a></li>
            <% } %>
            </li>
        </ul>
    </div>
</nav>